//
//  SJNibHandleTool.m
//  eBondMall
//
//  Created by 赵世杰 on 2020/4/4.
//  Copyright © 2020 zhaoshijie. All rights reserved.
//

#import "SJNibHandleTool.h"

@implementation SJNibHandleTool



/// 获取nib文件
/// @param nibName bib文件名
+ (id)getNibFileWithNibName:(NSString *)nibName
{
    return [[NSBundle mainBundle]loadNibNamed:nibName owner:nil options:nil].firstObject;
    
}



/// 获取nib文件
/// @param nibName bib文件名
+ (id)getNibFileWithNibName:(NSString *)nibName frame:(CGRect)frame
{
    UIView *bgView = [[UIView alloc]initWithFrame:frame];
    
    UIView *nibView = [[NSBundle mainBundle]loadNibNamed:nibName owner:nil options:nil].firstObject;
    nibView.frame = bgView.bounds;
    [bgView addSubview:nibView];
    
    
    return bgView;
    
}



@end
